
<div id="actionbar">
    <a href="{:url('vip.index/edit')}" class="button button-blue"> <i class="iconfont icon-add_icon"></i>增加会员组</a>
</div>
<table class="table table-border">
    <thead>
        <tr>
            <th class="w80 fn-tac">排序</th>
            <th>会员名称</th>
            <th class="w80 fn-tar">开通金额</th>
            <th class="w100 fn-tar">直推奖(￥)</th>
            <th class="w100 fn-tar">间推奖(￥)</th>
            <th class="w100 fn-tar">采购基金(￥)</th>
            <th class="w100 fn-tar">买单消费(%)</th>
            <th class="w100 fn-tar">门店会员(%)</th>
            <th class="w80 fn-tac">升级</th>
            <th class="w80 fn-tar">会员数</th>
            <th class="w80 fn-tar">商家数</th>
            <th class="w140 fn-tac">更新时间</th>
            <th class="w60 fn-tac">状态</th>
            <th class="w240 fn-tac">删除</th>
        </tr>
    </thead>
    <tbody>
        {foreach $lists as $vo}
        <tr>
            <td class="fn-tac"><input name="sort" class="fn-tac w40 input input-mini sort" type="text" value="{$vo['sort']}" id="{$vo.id}" /></td>
            <td><a href="{:url('vip.user/index',['vip_id'=>$vo.id])}" title="会员列表">{$vo.name}</a></td>
            <td class="fn-tar">{$vo.price}</td>
            <td class="fn-tar">￥{$vo.open_share_reward}</td>
            <td class="fn-tar">￥{$vo.open_queue_reward}</td>
            <td class="fn-tar">￥{$vo.fund}</td>
            <td class="fn-tar">{$vo.pay_share_reward}%</td>
            <td class="fn-tar">{$vo.pay_queue_reward}%</td>
            <td class="fn-tac">
                <a class="istop" url="{:url('vip.index/isAutoUp',['id'=>$vo.id])}" href="javascript:;" title="允许/禁止">
                {if $vo.is_auto_up}<span class="badge bg-green">允许</span>{else}<span class="badge">禁止</span>{/if}
                </a>
            </td>
            <td class="fn-tar">{$vo.open_vip_num}</td>
            <td class="fn-tar">{$vo.open_store_num}</td>
            <td class="fn-tac">{$vo.update_time|date='Y-m-d H:i'}</td>
            <td class="fn-tac">
                <span url="{:url('vip.index/isLock',['id'=>$vo.id])}" class="fn-cp act badge {$vo.is_lock?'':'bg-green'}">{$vo.is_lock?'锁定':'正常'}</span>
            </td>
            <td class="button-group">
                <a class="button win" href="javascript:;" url="{:url('vip.coupon/index',['id'=>$vo.id])}" title="优惠券"><i class="iconfont icon-discount"></i>优惠券</a>
                <a class="button" href="{:url('vip.index/edit',['id'=>$vo.id])}" title="编辑"><i class="iconfont icon-edit"></i>编辑</a>
                <a class="button isDel" url="{:url('vip.index/delete',['id'=>$vo.id])}" href="javascript:;" title="删除"><i class="iconfont icon-lajixiang"></i>删除</a>
             </td>
        </tr>
        {/foreach}
    </tbody>
</table>
{$lists|raw}
<script type="text/javascript">
    Do('base', 'layer', function () {
        $('.isDel').isDel();
        $(".win").win();
        $(".act").actUrl();
        $(".sort").changeUrl({
            url:"{:url('vip.index/sort')}"
        });
        $('.istop').click(function () {
            var url = $(this).attr("url");
            parent.layer.confirm('确认要设置升级状态?',{ icon: 3,title: '友情提示' }, function (index) {
                $.getJSON(url, function (data) {window.location.reload();});
                parent.layer.close(index);
            });
        })
    })
</script>